package com.neighbor.neighborhooduser.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 用户积分记录表
 * </p>
 *
 * @author song
 * @since 2025-09-22 09:13:04
 */
@Getter
@Setter
@Data
@TableName("points_records")
public class PointsRecords {

    /**
     * 记录唯一ID
     */
    @TableId(value = "record_id", type = IdType.AUTO)
    private Integer recordId;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 类型(1:获取,2:消耗)
     */
    @TableField("type")
    private Byte type;

    /**
     * 积分数量
     */
    @TableField("amount")
    private Integer amount;

    /**
     * 来源类型(1:发帖,2:回复,3:点赞,4:求助解决,5:兑换商品)
     */
    @TableField("source_type")
    private Byte sourceType;

    /**
     * 来源ID(帖子ID/回复ID/商品ID等)
     */
    @TableField("source_id")
    private Integer sourceId;

    /**
     * 描述
     */
    @TableField("description")
    private String description;

    /**
     * 创建时间
     */
    @TableField("created_at")
    private Date createdAt;

    @TableField(exist = false)
    private List<PointsRecords> pointsRecordsList;
}
